import re
import functools





def calca(formula):
    parenthesise_flag = True
    calc_res = None
    while parenthesise_flag:
        m = re.search("\([^()]*\)",formula)
        if m :
            print("先计算狂好中的值：",m.group())
        else:
            print("框号不对")
            parenthesise_flag = False

if __name__ == '__main__':
    res = calca("1 - 2 * ( (60-30 +(-9-2-5-2*3-5/3-40*4/2-3/5+6*3) * (-9-2-5-2*5/3 + 7 /3*99/4*2998 +10 * 568/14 )) - (-4*3)/ (16-3*2)")




